<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css-variable</title>
</head>
<style>
    .demo {
        --r: 300px;
        width: var(--r);
        height: var(--r);
        border: 2px solid #000;
    }
</style>

<body>
    <div class="demo">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
</body>

</html>